package cn.wsalix.type;

public enum UserRegTypeEnum {
	normal("0", "正常"),phone("1", "手机用户"),qq("2", "QQ用户"),weixin("2", "微信用户"),sina("3", "微博用户"),;
	private String code;
	private String title;

	UserRegTypeEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static UserRegTypeEnum findByCode(String code) {
		for (UserRegTypeEnum userKind : UserRegTypeEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
